<?php

$sysApps = new sysApps();
$sysApps->DBconnect();

$realParent = $_GET['child'];

$listAllInfo = getChildTree($realParent);
$userProfile = getUserProfilebyMgmId($realParent);

?>


	<link href="css/node.css" rel="stylesheet" type="text/css" />
    <div id="childInfo">List of Income Childs<br/>
		<center>
			<div class="tree">
				<ul>
					<li><a href="#" class='activeNode' ></a> Active
					</li>
				</ul>
			</div>
			<div class="tree">
				<ul>
					<li><a href="#" class='topupNode' ></a> Last Month
					</li>
				</ul>
			</div>
			<div class="tree">
				<ul>
					<li><a href="#" class='expiredNode' ></a> Expired
					</li>
				</ul>
			</div>
			<br/>
			<div class="tree">
				<ul>
					<li><a href="#" <?php echo childNodeStyle($userProfile->getStatus()); ?> ><?php echo $userProfile->getUserName();?></a>
						<?php 
							if(!empty($listAllInfo))
							{
								echo "<ul>";
								
									$count = 0;
									foreach ($listAllInfo as $info) 
									{
										echo $info->getTrees();
									}
								echo "</ul>";
							}
						?>
					</li>
				</ul>
			</div>
		</center>
    </div>

